package com.baizhi.iox;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 拷贝视频并测试性能
 */
public class VideoCopy02 {
    public static void main(String[] args) throws IOException {

        long start = System.currentTimeMillis();

        FileInputStream fis = new FileInputStream("G:/java笔记/day16/5月9日pm.mp4");
        FileOutputStream fos = new FileOutputStream("./javase_io/上课视频.mp4");

        int d;
        while ((d = fis.read()) != -1) {
            fos.write(d);
        }

        fos.close();
        fis.close();

        long end = System.currentTimeMillis();

        System.out.println("拷贝结束：耗时："+(end-start)+"ms");
    }
}
